package com.zbec.mdrs.web;

import com.zbec.mdrs.entity.ColModelConfig;
import com.zbec.mdrs.service.ColModelConfigService;
import com.zbec.mdrs.vo.ColModelConfigVo;
import org.json.simple.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created by fxl on 2016/1/20.
 */
@Controller
@RequestMapping(value = "/colMoldeConfig")
public class ColModelConfigController {
    @Autowired
    private ColModelConfigService colModelConfigService;

    @RequestMapping(value = "/saveConfig")
    @ResponseBody
    public String saveConfig(ColModelConfigVo vo){
        ColModelConfig config= colModelConfigService.saveConfig(vo);

        JSONObject object=new JSONObject();
        object.put("result","true");
        object.put("message",config.getId());
        return object.toJSONString();
    }
}
